<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SoundGetWaveVolume</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>SoundGetWaveVolume</h1>

<p>Retrieves the wave output volume for a sound device.</p>

<pre class="Syntax">SoundGetWaveVolume, OutputVar [, DeviceNumber]</pre>
<h3>Parameters</h3>
<dl>

  <dt>OutputVar</dt>
  <dd><p>The name of the variable in which to store the retrieved volume level, which is a floating point number between 0 and 100 inclusive. The variable will be made blank if there was a problem retrieving the volume. The format of the floating point number, such as its decimal places, is determined by <a href="SetFormat.htm">SetFormat</a>.</p></dd>

  <dt>DeviceNumber</dt>
  <dd><p>If this parameter is omitted, it defaults to 1 (the first sound device), which is usually the system's default device for recording and playback. Specify a number higher than 1 to operate upon a different sound device.</p></dd>

</dl>
<h3>ErrorLevel</h3>
<p><span class="ver">[v1.1.04+]</span> This command is able to throw an exception on failure. For more information, see <a href="Catch.htm#RuntimeErrors">Runtime Errors</a>.</p>
<p><a href="../misc/ErrorLevel.htm">ErrorLevel</a> is set to 1 if there was a problem or 0 otherwise.</p>
<h3>Remarks</h3>
<p>The current wave output volume level can be set via <a href="SoundSetWaveVolume.htm">SoundSetWaveVolume</a>. Settings such as Master Volume, Synth, Microphone, Mute, Treble, and Bass can be set and retrieved using <a href="SoundSet.htm">SoundSet</a> and <a href="SoundGet.htm">SoundGet</a>.</p>
<p>Windows Vista and later (v1.1.10+): This command is equivalent to <a href="SoundGet.htm">SoundGet</a> with <em>ComponentType</em> set to <code>Wave</code> and <em>ControlType</em> set to <code>Volume</code>.
<h3>Related</h3>
<p><a href="SoundSetWaveVolume.htm">SoundSetWaveVolume</a>, <a href="SoundSet.htm">SoundSet</a>, <a href="SoundGet.htm">SoundGet</a>, <a href="SoundPlay.htm">SoundPlay</a></p>
<h3>Example</h3>
<pre class="NoIndent">SoundGetWaveVolume, OutputVar
MsgBox, The current wave output volume level is %OutputVar%`%.</pre>

</body>
</html>
